<template style="background-color: white;">
    <!--    莲桂 材料报价-->
    <!--    2025-06-06 18:58  创建页面  李佳奖
            -->
    <el-tabs type="border-card" v-model="activePane1" @tab-click="changeActivePane">
        <el-tab-pane name="资料清单">
            <template #label><el-icon><Memo /></el-icon><span>资料清单</span></template>

            <div>

                <el-card shadow="never" style="height: 40px;">
                    <div style="margin-top: -10px;width: 100%">

                        <text style="font-weight: bold;margin-right: 10px">总数：{{pagination.total}}</text>


                        <span >

                                <el-select v-model="searchCondition.qList[0].qA" filterable clearable placeholder="选择查询条件" style="width: 120px;" @change="selectSearchConditionQa(item)">
                                    <el-option v-for="item2 in labelNameList" :key="item2.prop" :label="item2.label" :value="item2.prop"/>
                                </el-select>

                                <el-select v-model="searchCondition.qList[0].qB" style="width: 90px">
                                    <el-option label="like" value="like"/>
                                    <el-option label="not like" value="not like"/>
                                    <el-option label="=" value="="/>
                                    <el-option label=">=" value=">="/>
                                    <el-option label="<=" value="<="/>
                                </el-select>

                                <el-date-picker v-if="searchCondition.qList[0].qT=='datetype'" type="date" value-format="YYYY-MM-DD" v-model="searchCondition.qList[0].qC" style="width:150px"  />
                                <el-select v-else-if="searchCondition.qList[0].qT=='boole'" v-model="searchCondition.qList[0].qC" style="width: 150px" clearable  >
                                    <el-option label="是" value="1"/>
                                    <el-option label="否" value="0"/>
                                </el-select>
                                <el-input v-else v-model="searchCondition.qList[0].qC" @keyup.enter="search"  style="width: 150px"/>


                                <el-select v-model="searchCondition.qList[1].qA" filterable clearable placeholder="选择查询条件" style="width: 120px;" @change="selectSearchConditionQa(item)">
                                    <el-option v-for="item2 in labelNameList" :key="item2.prop" :label="item2.label" :value="item2.prop"/>
                                </el-select>

                                <el-select v-model="searchCondition.qList[1].qB" style="width: 90px">
                                    <el-option label="like" value="like"/>
                                    <el-option label="not like" value="not like"/>
                                    <el-option label="=" value="="/>
                                    <el-option label=">=" value=">="/>
                                    <el-option label="<=" value="<="/>
                                </el-select>

                                <el-date-picker v-if="searchCondition.qList[1].qT=='datetype'" type="date" value-format="YYYY-MM-DD" v-model="searchCondition.qList[1].qC" style="width:150px"  />
                                <el-select v-else-if="searchCondition.qList[1].qT=='boole'" v-model="searchCondition.qList[1].qC" style="width: 150px" clearable  >
                                    <el-option label="是" value="1"/>
                                    <el-option label="否" value="0"/>
                                </el-select>
                                <el-input v-else v-model="searchCondition.qList[1].qC" @keyup.enter="search"  style="width: 150px"/>



                                <el-button type="primary" @click="search" ><el-icon><Search/></el-icon>查询</el-button>


                            </span>



                        <el-dropdown style="float: right;margin-top: 3px;">
                            <el-button type="primary"  ><el-icon><ArrowDown/></el-icon>Excel导出</el-button>
                            <template #dropdown>
                                <el-dropdown-menu>
                                    <el-dropdown-item @click="getExportToExcelData">按视图导出</el-dropdown-item>
                                </el-dropdown-menu>
                            </template>
                        </el-dropdown>
                    </div>


                </el-card>
                <el-table :data="tableList" stripe border style="font-weight: bold" ref="ref_mainTable" :max-height="tableHeight" :cell-style="cellStyle" row-key="MBID"
                          highlight-current-row  @current-change="handleCurrentSelectChange" @expand-change="expandChange" @sort-change="handleSortChange"  :load="loading" >


                    <el-table-column label="" prop="index" width="50" align="center"/>
                    <template v-for="(item, index) in labelNameList">
                        <el-table-column
                                v-if="item.noShow==null"
                                :fixed="item.fixed"
                                :key="`col_${index}`"
                                :prop="item.prop"
                                :label="item.label"
                                :width="item.width"
                                align="left"
                                :sortable="item.sortable?true:false"
                                :type="item.prop=='expand'?'expand':null"
                        >
                            <template v-slot="scope">
                                <div v-if="labelNameList[index].datetype ">
                                    <span>{{timeToStrTime(scope.row[labelNameList[index].prop],'2')}}</span>
                                </div>
                                <div v-if="labelNameList[index].prop=='CheckState' ">
                                    <el-text type="warning" v-if="scope.row[labelNameList[index].prop]==null">待审核</el-text>
                                    <el-text type="success" v-else>已审核</el-text>
                                </div>
                                <div v-if="labelNameList[index].prop=='RebateNum1Show' && scope.row['RebateMoney1']!=null && scope.row['RebateMoney1']!='' ">
                                    收货 {{scope.row['RebateNum1']}}吨，每吨返{{scope.row['RebateMoney1']}}元

                                </div>
                                <div v-if="labelNameList[index].prop=='RebateNum2Show' && scope.row['RebateMoney2']!=null && scope.row['RebateMoney2']!='' ">
                                    收货 {{scope.row['RebateNum2']}}吨，每吨返{{scope.row['RebateMoney2']}}元
                                </div>

                                <div v-if="labelNameList[index].prop=='ValidTimeStart' && scope.row['ValidTimeStart']!=null">
                                   <el-text v-if="checkOverdue(scope.row['ValidTimeStart'])" style="color:red">{{scope.row['ValidTimeStart']}}</el-text>
                                    <el-text v-else >{{scope.row['ValidTimeStart']}}</el-text>
                                </div>
                                <div v-if="labelNameList[index].prop=='ValidTimeEnd' && scope.row['ValidTimeEnd']!=null">
                                    <el-text style="color:red" v-if="checkOverdue(scope.row['ValidTimeEnd'])">{{scope.row['ValidTimeEnd']}}</el-text>
                                    <el-text v-else >{{scope.row['ValidTimeEnd']}}</el-text>
                                </div>

                                <div v-if="labelNameList[index].prop === 'expand'" style="text-align: left;">

                                    <el-table :data="scope.row.items" style="width: 100%;">
                                        <el-table-column label="版本号" prop="MBIndex"  align="center" :width="80"/>
                                        <template v-for="(item_i, index_i) in labelNameList">
                                            <el-table-column
                                                    v-if="item_i.noShow==null"
                                                    :fixed="item_i.fixed"
                                                    :key="`col_${index_i}`"
                                                    :prop="item_i.prop"
                                                    :label="item_i.label"
                                                    :width="item_i.width"
                                                    align="left"

                                            >
                                                <template v-slot="scope_i">
                                                    <div v-if="'供应商号，供应商名，品号，品名，'.indexOf(item_i.label)!=-1">

                                                    </div>

                                                    <div v-if="labelNameList[index_i].label=='修改时间' ">
                                                        <span v-if="scope_i.row['ModifyDate']!=null">{{timeToStrTime(scope_i.row['ModifyDate'],'2')}}</span>
                                                        <span v-else>{{timeToStrTime(scope_i.row['CreateDate'],'2')}}</span>
                                                    </div>

                                                    <div v-if="labelNameList[index_i].label=='修改人' ">
                                                        <span v-if="scope_i.row['Modifier']!=null">{{scope_i.row['Modifier']}}</span>
                                                        <span v-else>{{scope_i.row['Creator']}}</span>
                                                    </div>


                                                    <div v-if="labelNameList[index_i].datetype ">
                                                        <span>{{timeToStrTime(scope_i.row[labelNameList[index_i].prop],'2')}}</span>
                                                    </div>

                                                    <div v-if="labelNameList[index_i].prop=='RebateNum1Show' && scope_i.row['RebateMoney1']!=null && scope_i.row['RebateMoney1']!='' ">
                                                        收货 {{scope.row['RebateNum1']}}吨，每吨返{{scope.row['RebateMoney1']}}元

                                                    </div>
                                                    <div v-if="labelNameList[index_i].prop=='RebateNum2Show' && scope_i.row['RebateMoney2']!=null && scope_i.row['RebateMoney2']!='' ">
                                                        收货 {{scope.row['RebateNum2']}}吨，每吨返{{scope.row['RebateMoney2']}}元
                                                    </div>

                                                    <div v-if="labelNameList[index_i].prop=='ValidTimeStart' && scope_i.row['ValidTimeStart']!=null">
                                                        <el-text v-if="checkOverdue(scope_i.row['ValidTimeStart'])" style="color:red">{{scope_i.row['ValidTimeStart']}}</el-text>
                                                        <el-text v-else >{{scope_i.row['ValidTimeStart']}}</el-text>
                                                    </div>
                                                    <div v-if="labelNameList[index_i].prop=='ValidTimeEnd' && scope_i.row['ValidTimeEnd']!=null">
                                                        <el-text style="color:red" v-if="checkOverdue(scope_i.row['ValidTimeEnd'])">{{scope_i.row['ValidTimeEnd']}}</el-text>
                                                        <el-text v-else >{{scope_i.row['ValidTimeEnd']}}</el-text>
                                                    </div>


                                                </template>
                                            </el-table-column>
                                        </template>

<!--                                        <el-table-column label="价格" prop="BidPrice"  align="left" :width="140"/>-->
<!--                                        <el-table-column label="审核时间" prop="CheckDate" align="center" :width="150">-->
<!--                                            <template v-slot="scopeItem">-->
<!--                                                <span>{{timeToStrTime(scopeItem.row['CheckDate'],'2')}}</span>-->
<!--                                            </template>-->
<!--                                        </el-table-column>-->
<!--                                        <el-table-column label="审核人" prop="Checkor" align="center"/>-->
<!--                                        <el-table-column label="返利1"  align="center" :width="180">-->
<!--                                            <template v-slot="scopeItem">-->
<!--                                                <span v-if="scopeItem.row['RebateMoney1']!=null">收货 {{scopeItem.row['RebateNum1']}}吨，每吨返{{scopeItem.row['RebateMoney1']}}元</span>-->
<!--                                            </template>-->
<!--                                        </el-table-column>-->
<!--                                        <el-table-column label="返利2"  align="center" :width="180">-->
<!--                                            <template v-slot="scopeItem">-->
<!--                                                <span v-if="scopeItem.row['RebateMoney2']!=null">收货 {{scopeItem.row['RebateNum2']}}吨，每吨返{{scopeItem.row['RebateMoney2']}}元</span>-->
<!--                                            </template>-->
<!--                                        </el-table-column>-->
<!--                                        <el-table-column label="报价时间" prop="mr003"  align="center" :width="150">-->
<!--                                            <template v-slot="scopeItem">-->
<!--                                                <span>{{timeToStrTime(scopeItem.row['CreateDate'],'2')}}</span>-->
<!--                                            </template>-->
<!--                                        </el-table-column>-->
<!--                                        <el-table-column label="报价人" prop="Creator" align="center"/>-->
<!--                                        <el-table-column label="生成订单" prop="billcode"  align="center"/>-->
<!--                                        <el-table-column label="被中止的旧订单" prop="canclOldOrder"  align="center"/>-->

                                    </el-table>

                                </div>

                            </template>
                        </el-table-column>
                    </template>


                </el-table>

                <!--    页脚-->
                <el-card shadow="never" style="height: 40px;">
                    <el-pagination style="float:right;margin-top: -3px" v-model:current-page="pagination.current" v-model:page-size="pagination.pageSize" v-model:total="pagination.total"
                                   :page-sizes="[20,30, 50, 100, 200]" background small
                                   layout="sizes, prev, pager, next" @size-change="handleCurrentChange" @current-change="handleCurrentChange"/>
                </el-card>

            </div>


        </el-tab-pane>

        <el-tab-pane name="资料维护">
            <template #label><el-icon><Edit /></el-icon><span>资料维护</span></template>


            <div :style="{overflow: 'auto',height: tableHeight+40+'px'}">
                <div >


                    <el-row :gutter="23" >
                        <!--        更新报价-->
                        <el-col :span="10" style="border: #b1b3b8 1px solid;">
                            <div :style="{overflow: 'auto',height: tableHeight-30+'px',}">
                                <span v-if="entity.post!=null">
                                     <el-text v-if="entity.MPID==null" tag="b" size="large" type="warning">〖创建新报价〗</el-text>
                                     <el-text v-else tag="b" size="large" type="warning">〖预览过往报价〗</el-text>
                                     <el-button type="success" plain  link @click="addNewPast(entity)" style="margin-left: 5px"><el-icon><Plus/></el-icon>创建新报价(针对当前供应商+品号)</el-button>

                                </span>

                                <span v-else>
                                    <el-text v-if="entity.MBID==null" tag="b" size="large" type="warning">〖创建新报价〗</el-text>
                                    <el-text v-else tag="b" size="large" type="warning">〖修改报价〗
                                        <el-button type="success" plain  link @click="addNewPast(entity)" style="margin-left: 5px"><el-icon><Plus/></el-icon>创建新报价(针对当前供应商+品号)</el-button>
                                    </el-text>
                                </span>

                                <div style="text-align: center">
                                    <table style="border-collapse: collapse;width: 100%;margin: auto;margin-top: 10px">
                                        <tr >

                                            <td class="confirmTablelabel" style="width:100px"><el-text tag="b">供应商</el-text></td>
                                            <td>
                                                <!--                                                    <el-input   v-model="entity.SupplierNo" style="margin-left: -10px"  class="selectBo" @click="openSelectDialog_fast(entity,'SupplierNo')"  />-->
                                                <el-select v-model="entity.SupplierNo"  filterable remote reserve-keyword :remote-method="supRemoteMethod" :loading="loading" @change="changeSupToGetSupName" style="width: 100%;margin-left: -10px" :disabled="entity.MBID!=null">
                                                    <template v-for="item in supOptions" :key="item.value">
                                                        <el-option v-if="item.closed!=null && item.closed==0" :label="item.value+item.label" :value="item.value"/>
                                                    </template>
                                                </el-select>
                                            </td>
                                            <td class="confirmTablelabel" style="width:100px"><el-text tag="b">名称</el-text></td>
                                            <td><el-input  v-model="entity.SupplierName" class='noinput'  :readonly="true" style="margin-left: -10px"/></td>
                                        </tr>
                                        <tr >
                                            <td class="confirmTablelabel"><el-text tag="b">品号</el-text></td>
                                            <td>
                                                <!--                                                    <el-input   v-model="entity.GoodsNo" style="margin-left: -10px" class="selectBo" @click="openSelectDialog_fast(entity,'GoodsNo')"  />-->
                                                <el-select v-model="entity.GoodsNo"  filterable remote reserve-keyword :remote-method="goodsRemoteMethod" :loading="loading" @change="changegoodsToGetgoodsName" style="width: 100%;margin-left: -10px" :disabled="entity.MBID!=null">
                                                    <el-option v-for="item in goodsOptions" :key="item.value" :label="item.value+item.label" :value="item.value"/>
                                                </el-select>
                                            </td>
                                            <td class="confirmTablelabel"><el-text tag="b">品名</el-text></td>
                                            <td><el-input  v-model="entity.GoodsName" class='noinput'  :readonly="true" style="margin-left: -10px"/></td>
                                        </tr>
                                        <tr >
                                            <td class="confirmTablelabel"><el-text tag="b">有效期起</el-text></td>
                                            <td><el-date-picker class="inputnoBorder" v-model="entity.ValidTimeStart" type="datetime" :clearable="false" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;margin-left: -10px"/></td>

                                            <td class="confirmTablelabel"><el-text tag="b">有效期止</el-text></td>
                                            <td><el-date-picker class="inputnoBorder" v-model="entity.ValidTimeEnd" type="datetime" :clearable="false" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;margin-left: -10px"/></td>
                                        </tr>
                                        <tr >
                                            <td class="confirmTablelabel" style="height: 35px"><el-text tag="b">返利1</el-text></td>
                                            <td colspan="3" style="font-weight: bold;text-align: left">收货<input type="number" v-model="entity.RebateNum1" class="inputUnberBorder_haveB" style="width:60px;margin-left: 10px" />吨，每吨返<input type="number" v-model="entity.RebateMoney1" class="inputUnberBorder_haveB" style="width:60px;margin-left: 10px" />元</td>

                                        </tr>
                                        <tr >
                                            <td class="confirmTablelabel" style="height: 35px"><el-text tag="b">返利2</el-text></td>
                                            <td colspan="3" style="font-weight: bold;text-align: left">收货<input type="number" v-model="entity.RebateNum2" class="inputUnberBorder_haveB" style="width:60px;margin-left: 10px" />吨，每吨返<input type="number" v-model="entity.RebateMoney2" class="inputUnberBorder_haveB" style="width:60px;margin-left: 10px" />元</td>

                                        </tr>
                                        <tr >
                                            <td class="confirmTablelabel" style="height: 35px"><el-text tag="b">运费</el-text></td>
                                            <td colspan="3" style="font-weight: bold;text-align: left">
                                                    是否含运费：
                                                <el-radio-group v-model="entity.HaveFare"  style="margin-right: 10px;border-right: 1px solid gainsboro;padding-right: 8px">
                                                    <el-radio label="是" size="large">是</el-radio>
                                                    <el-radio label="否" size="large">否</el-radio>
                                                </el-radio-group>

                                                <span v-if="entity.HaveFare=='否'">
                                                     <br>  运费交付：
<!--                                                    <el-select v-model="entity.FareTo" style="width: 150px">-->
<!--                                                        <el-option label="运费付车队" value="运费付车队"/>-->
<!--                                                        <el-option label="运费付供应商" value="运费付供应商"/>-->
<!--                                                    </el-select>-->
                                                    返运费：<input type="number" v-model="entity.ReturnFare" class="inputUnberBorder_haveB" style="width:70px;margin-left: 3px;margin-right: 10px" /><br>

                                                    <el-button type="success" plain  @click="fl_addNewFreightList()" style="margin-left: 5px"><el-icon><Plus/></el-icon>添加车队供应商</el-button>

                                                    <div v-for="(fl_item,fl_index) in fl_bidFreightList" :key="fl_index">
                                                        车队供应商：
                                                         <el-select v-model="fl_item.TransportSupplierNo"  filterable remote reserve-keyword :remote-method="fl_supRemoteMethod" :loading="loading" @change="fl_changeSupToGetSupName(fl_item)" style="width: 30%;margin-left: -10px" >
                                                            <template v-for="item in fl_supOptions" :key="item.value">
                                                                <el-option  :label="item.value+item.label" :value="item.value"/>
                                                            </template>
                                                        </el-select>

                                                        莲桂支付运费：<input type="number" v-model="fl_item.Cost" class="inputUnberBorder_haveB" style="width:70px;margin-left: 3px" />
                                                            <el-button type="danger" plain  link @click="fl_removeFreightList(fl_index)" style="margin-left: 5px"><el-icon><Delete/></el-icon></el-button>
                                                    </div>


                                                </span>

                                            </td>

                                        </tr>
                                        <tr >
                                            <td class="confirmTablelabel" ><el-text tag="b">出价</el-text></td>
                                            <td><el-input  type="number" v-model="entity.BidPrice" style="margin-left: -10px">
                                                <template #append>每吨</template>
                                            </el-input></td>

                                        </tr>
                                        <tr >
                                            <td class="confirmTablelabel" ><el-text tag="b">备注</el-text></td>
                                            <td colspan="3"><el-input   v-model="entity.Remark" style="margin-left: -10px"/></td>

                                        </tr>


                                    </table>
                                </div>

                                <div style="width: 100%;text-align: center;margin-top: 20px">


                                    <el-button  type="primary" size="large" style="width:100px" @click="EditOK"> 保存 </el-button>

                                </div>

                                <el-descriptions :column="2"  style="border: #cfcfcf 1px solid;margin-top: 20px">
                                    <el-descriptions-item>
                                        <template #label><el-text tag="b">创建人</el-text></template>
                                        <el-text tag="b" type="info">{{entity.Creator}}</el-text>
                                    </el-descriptions-item>
                                    <el-descriptions-item>
                                        <template #label><el-text tag="b">修改人</el-text></template>
                                        <el-text tag="b" type="info">{{entity.Modifier}}</el-text>
                                    </el-descriptions-item>


                                    <el-descriptions-item>
                                        <template #label><el-text tag="b">创建日期</el-text></template>
                                        <el-text tag="b" type="info">{{timeToStrTime(entity.CreateDate,'2')}}</el-text>
                                    </el-descriptions-item>
                                    <el-descriptions-item>
                                        <template #label><el-text tag="b">修改日期</el-text></template>
                                        <el-text tag="b" type="info">{{timeToStrTime(entity.ModifyDate,'2')}}</el-text>
                                    </el-descriptions-item>


                                </el-descriptions>


                            </div>
                        </el-col>
                        <!--        历史报价记录-->
                        <el-col :span="14" style="border: #b1b3b8 1px solid">
                            <div :style="{height: tableHeight-100+'px',width:'100%'}">
                                <el-text tag="b" size="large">〖历史报价记录〗</el-text>
                                <el-card shadow="never" style="height: 40px;">
                                    <div style="margin-top: -8px">
                                        <text style="font-weight: bold">总数：{{p_tableData.length}}</text>
                                        <span style="float:right">


                                        </span>

                                    </div>
                                </el-card>

                                <el-table :data="p_tableData" border :style="{height: tableHeight-100+'px'}"
                                          style="font-weight: bold;"   :load="loading"  highlight-current-row>

                                    <el-table-column label="预览"   align="center" :width="50">
                                        <template v-slot="scope">
                                            <el-button type="primary" plain  link @click="p_showPostTableData(scope.row)" style="margin-left: 5px"><el-icon><View/></el-icon></el-button>
                                        </template>
                                    </el-table-column>
                                    <el-table-column label="版本号" prop="MBIndex"  align="center" :width="80"/>
                                    <el-table-column label="价格" prop="BidPrice"  align="center" :width="80"/>
                                    <el-table-column label="更新时间" prop="mr003"  align="center" :width="150">
                                        <template v-slot="scope">
                                            <span v-if="scope.row['ModifyDate']!=null">{{timeToStrTime(scope.row['ModifyDate'],'2')}}</span>
                                            <span v-else>{{timeToStrTime(scope.row['CreateDate'],'2')}}</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column label="更新人" align="center">
                                        <template v-slot="scope">
                                            <span v-if="scope.row['Modifier']!=null">{{scope.row['Modifier']}}</span>
                                            <span v-else>{{scope.row['Creator']}}</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column label="审核时间" prop="CheckDate" align="center" :width="150">
                                        <template v-slot="scope">
                                            <span>{{timeToStrTime(scope.row['CheckDate'],'2')}}</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column label="审核人" prop="Checkor" align="center"/>
                                    <el-table-column label="生成订单" prop="billcode"  align="center"/>
                                    <el-table-column label="被中止的旧订单" prop="canclOldOrder"  align="center"/>
                                </el-table>


                            </div>
                        </el-col>
                    </el-row>



                </div>

            </div>


        </el-tab-pane>

        <!--                操作按钮界面-->
        <el-tab-pane style="margin: 0px;padding: 0px">
            <template #label @click.stop="" style="margin: 0px;padding: 0px">
                <div style="width: 80px;height: 34px;background-color: #ffffff;margin: -20px" @click.stop="" >
                    <!--                        <el-button type="primary" plain @click="queryDialogVisible=true" style="margin-left: 5px"><el-icon><Search/></el-icon>查询</el-button>-->

                    <span >
                            <el-button type="success" plain   @click="addNew" style="margin-left: 5px"><el-icon><Plus/></el-icon>新增</el-button>
                            <el-button type="success" plain   @click="checkIsHaveOrder" style="margin-left: 5px"><el-icon><Select/></el-icon>审核</el-button>
                    </span>


                    <!--                    预览-->
                    <el-dropdown >
                        <el-button type="primary" plain style="margin-left: 5px;" ><el-icon><ArrowDown/></el-icon>预览</el-button>
                        <template #dropdown>
                            <el-dropdown-menu>
                                <!--                                    <el-dropdown-item @click="openFile('mjda')">试验大纲报表</el-dropdown-item>-->
                                <el-dropdown-item >暂无</el-dropdown-item>
                            </el-dropdown-menu>
                        </template>
                    </el-dropdown>


                </div>

            </template>

        </el-tab-pane>


    </el-tabs>

    <!--    查询条件框-->
    <el-dialog
            v-model="queryDialogVisible"
            width="40%"
            align-center draggable

    >

        <template #header="{ close, titleId, titleClass }">
            <el-text  size="large" tag="b">查询</el-text>
        </template>

        <div :style="{height: '350'+'px',margin:'20px'}">


            <!--                <el-radio-group v-model="searchCondition.state" style="margin-right: 10px;border-left: 1px solid gainsboro;padding-right: 8px">-->
            <!--                    <el-radio label="" size="large">全部</el-radio>-->
            <!--                    <el-radio label="chkstatus = '已审核'" size="large"><el-text style="background-color: #a5faff">已审核</el-text></el-radio>-->
            <!--                    <el-radio label="chkstatus = '未审核'" size="large">未审核</el-radio>-->
            <!--                </el-radio-group>-->


            <el-form  label-width="50px" v-for="(item,index) in searchCondition.qList" :key="index">
                <el-form-item v-if="index==0" label="" ><el-text tag="b">按《资料清单》字段查找</el-text></el-form-item>

                <el-form-item :label="'条件'+(index+1)" >
                    <el-select v-model="item.qD" style="width: 70px">
                        <el-option label="and" value="and"/>
                        <el-option label="or" value="or"/>
                    </el-select>

                    <el-select v-model="item.qA" filterable clearable placeholder="选择查询条件" style="width: 150px" @change="selectSearchConditionQa(item)">
                        <el-option v-for="item2 in labelNameList" :key="item2.prop" :label="item2.name" :value="item2.prop"/>
                    </el-select>

                    <el-select v-model="item.qB" style="width: 90px">
                        <el-option label="like" value="like"/>
                        <el-option label="not like" value="not like"/>
                        <el-option label="=" value="="/>
                        <el-option label=">=" value=">="/>
                        <el-option label="<=" value="<="/>
                    </el-select>

                    <!--                        <el-date-picker  type="date" value-format="YYYY" v-model=""   />-->

                    <el-date-picker v-if="item.qT=='datetype'" type="date" value-format="YYYY-MM-DD" v-model="item.qC" style="width:150px"  />
                    <el-select v-else-if="item.qT=='boole'" v-model="item.qC" style="width: 150px" clearable  >
                        <el-option label="是" value="1"/>
                        <el-option label="否" value="0"/>
                    </el-select>

                    <el-input v-else v-model="item.qC" @keyup.enter="search"  style="width: 150px"/>

                </el-form-item>

            </el-form>

        </div>


        <template #footer>
          <span class="dialog-footer">
            <el-button @click="queryDialogVisible=false">取消</el-button>
            <el-button type="primary"  @click="search">确定</el-button>

          </span>
        </template>
    </el-dialog>





    <!--    即时查询框-->
    <el-dialog
            v-model="selectDialogVisible_fast"
            width="60%"
            align-center draggable
    >

        <template #header="{ close, titleId, titleClass }">
            <el-text  size="large" tag="b">选择</el-text>
        </template>

        <div :style="{padding:'1px',margin:'20px'}">
            <el-input v-model="searchConditionSelect_fast"  style="margin: 5px;width: 300px" placeholder="请输入查询条件" @input="getSelectData_fast"/>


            <el-table :data="currentShowTableData_fast" stripe border :max-height="tableHeight-80" @row-click="handleCurrentSelectChange_select_fast"
                      style="font-weight: bold" >

                <el-table-column v-for="(item, index) in currentShowTableHeadCol_fast" :key="`col_${index}`"
                                 :prop="item.prop" :label="item.label" align="center" resizable/>

            </el-table>

        </div>


        <template #footer>
                  <span class="dialog-footer">
                    <el-button @click="selectDialogVisible_fast=false">取消</el-button>
                    <el-button type="primary"  @click="selectDialogVisible_fast=false">确定</el-button>

                  </span>
        </template>
    </el-dialog>

    <!--    新订单信息输入框-->
    <el-dialog
            v-model="inputNewOrderDialogVisible"
            width="40%"
            align-center draggable

    >

        <template #header="{ close, titleId, titleClass }">
            <el-text  size="large" tag="b">输入新订单</el-text>
        </template>

        <div :style="{height: '350'+'px',margin:'20px'}">


            <table class="baseInformationTable" style="width:100%" >
                <tr><td colspan="5"><el-checkbox v-model="isCreateOrder" ><el-text  tag="b">是否创建订单</el-text></el-checkbox></td></tr>
                <tr><td colspan="5"><el-text  tag="b">该供应商+品号不存在旧订单，无法自动获取订单数量，请输入订单数量和送货日期</el-text></td></tr>
                <tr>


                    <td style="width: 80px">订单数量(吨)</td>
                    <td><el-input type="number" v-model="entity.OrderNum"  v-if="isCreateOrder"/></td>
                </tr>

                <tr>
                    <td >送货日期</td>
                    <td><el-date-picker  v-model="entity.revdate" type="datetime" :clearable="false" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;margin-left: -10px"/></td>

                </tr>

            </table>



        </div>


        <template #footer>
          <span class="dialog-footer">
            <el-button @click="inputNewOrderDialogVisible=false">取消</el-button>
            <el-button type="primary"  @click="submitInputNewOrder">确定</el-button>

          </span>
        </template>
    </el-dialog>

    <!--   选择旧订单中止框-->
    <el-dialog
            v-model="selectOldOrderCanclDialogVisible"
            width="60%"
            align-center draggable

    >

        <template #header="{ close, titleId, titleClass }">
            <el-text  size="large" tag="b">选择旧订单中止</el-text>
        </template>

        <div >

            <el-checkbox v-model="isCreateOrder" ><el-text  tag="b">是否创建订单</el-text></el-checkbox>
            <el-table
                    :data="selectOldOrderCanclList"
                    style="width: 100%"
                    :max-height="tableHeight"
                    stripe border
            >

                <el-table-column fixed   label="" width="45" align="center">
                    <template #default="scope">
                        <el-checkbox v-model="scope.row.check" />
                    </template>
                </el-table-column>
                <el-table-column property="billcode"  label="订单号" />
                <el-table-column property="bDate"  label="订单日期" />

                <el-table-column property="quantity"  label="该材料数量" />
                <el-table-column property="sum_yj"  label="已收货数量" />
                <el-table-column property="price"  label="单价" />

            </el-table>

        </div>


        <template #footer>
              <span class="dialog-footer">
                <el-button @click="selectOldOrderCanclDialogVisible=false">取消</el-button>
                <el-button type="primary"  @click="selectOldOrderCanclSubmit">确定</el-button>
              </span>
        </template>
    </el-dialog>


    <!--        要导出的execl表格-->
    <table id="tbl_exporttable_to_xls" style="display: none">

        <tbody>

        <tr>
            <td  v-for="(item, index) in exportDropCol"  :key="`col_${index}`"
            >{{item.label}}</td>

        </tr>


        <tr v-for="(item,index) in ExportToExcelList" :key="index">
            <span v-for="(item2, index2) in exportDropCol"  :key="`col_${index2}`">
                <td >{{item[item2.prop]}}</td>

            </span>


        </tr>


        </tbody>
    </table>



</template>

<script setup lang="ts" >

    import {computed, defineComponent, onMounted, reactive, ref, getCurrentInstance, watch, nextTick} from 'vue';
    import axios from "axios";

    import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
    import {useStore} from "vuex";


    import filesaver from 'file-saver'
    import XLSXS from 'xlsx-js-style'

    const store = useStore()

    const proxy:any=ref({})
    const ref_JCtable:any=ref(null)
    const tableList = ref(); //ref相当于视图和模型间的中介

    const PageReq:any = ref({
        object: {},
        page: 0,
        size: 0,
    })

    const entity:any = ref({});



    const queryDialogVisible:any=ref(false)
    const searchCondition:any = ref({
        qList:[
            {qA:'SupplierName',qB:'like',qD:'and',qT:''},
            {qA:'GoodsName',qB:'like',qD:'and',qT:''},
            {qA:'ProjectName',qB:'like',qD:'and',qT:''},
        ],
        state:'',
        order:'',
    });//查询条件

    const currentRow:any=ref({})

    const pagination = ref({
        current: 1,
        pageSize: 30,
        total: 0
    });
    const spinning = ref(false);//加载中

    //对照列表  sql字段，字段含义，pojo字段
    const labelNameList:any=[

        {prop:'SupplierNo',label:'供应商号',width:'100',sortable:true},
        {prop:'SupplierName',label:'供应商名',width:'140',sortable:true},
        {prop:'GoodsNo',label:'品号',width:'100',sortable:true},
        {prop:'GoodsName',label:'品名',sortable:true},
        {prop:'BidPrice',label:'出价',width:'70'},
        {prop:'expand',label:'过往出价',width:'70'},
        {prop:'CreateDate',label:'创建时间',width:'180',datetype:true,sortable:true,noShow:true},
        {prop:'Creator',label:'创建人',width:'90',noShow:true},
        {prop:'CheckState',label:'审核状态',width:'90'},
        {prop:'CheckDate',label:'审核时间',width:'180',datetype:true,sortable:true},
        {prop:'Checkor',label:'审核人',width:'90'},
        {prop:'RebateNum1Show',label:'返利1',width:'180',},
        {prop:'RebateNum2Show',label:'返利2',width:'180',},
        {prop:'RebateNum1',label:'返利X吨1',width:'90',noShow:true},
        {prop:'RebateMoney1',label:'返利X元1',width:'90',noShow:true},
        {prop:'RebateNum2',label:'返利X吨2',width:'90',noShow:true},
        {prop:'RebateMoney2',label:'返利X元2',width:'90',noShow:true},
        {prop:'ValidTimeStart',label:'有效期起',width:'180',sortable:true},
        {prop:'ValidTimeEnd',label:'有效期止',width:'180',sortable:true},
        {prop:'HaveFare',label:'是否含运费',width:'90'},
        {prop:'FareTo',label:'付运费对象',width:'90',noShow:true},
        {prop:'ReturnFare',label:'返运费',width:'90'},

        {prop:'FareValue',label:'莲桂支付运费',width:'90'},
        {prop:'Remark',label:'备注',width:'90'},
        {prop:'ModifyDate',label:'修改时间',width:'180',datetype:true,sortable:true},
        {prop:'Modifier',label:'修改人',width:'90'},

    ]

    const loading = ref(false);//是否加载数据

    const showEntity:any=ref({})

    const activePane1=ref('资料清单');//一级pane激活

    const changeActivePane= async (pane: any, ev: Event) => {

        entity.value={}

        Object.getOwnPropertyNames(currentRow.value).forEach(key =>{
                entity.value[key]=currentRow.value[key]
            }
        )


        if (pane.paneName == '资料维护') {

            fl_bidFreightList.value=[]
            p_getPostTableData()//查询过往报价记录
        }


    }

    const cellStyle = ({rowIndex,columnIndex,row,column }:any) => {
        // 状态列字体颜色
        // columnIndex 列下标
        // rowIndex 行下标
        // row 行
        // column 列

        let style:any={}
        if (row.chkstatus =='已审核'){
            style.backgroundColor="#a5faff"
        }
        if (row.cancelstatus =='已作废'){
            style.textDecoration="line-through"
            style.textDecorationThickness="3px"
        }



        style.border="1px #c1c4c4 solid"

        return style


        // if (column.property=='kindno' || column.property=='serialno' || column.property=='jcstand'|| column.property=='maxvalue'|| column.property=='minvalue') {
        //     return { backgroundColor: "#e3ffff" };
        // }
        // else if (row.classify != null && columnIndex === 4) {
        //     return { color: "#189EFF" };
        // } else if (row.standardState =='现行' && columnIndex === 6) {
        //     return { color: "#1CD66C" };
        // } else if (row.standardState == '即将实施' && columnIndex === 6) {
        //     return { color: "#189EFF" };
        // } else if (row.standardState == '废止' && columnIndex === 6) {
        //     return { color: "red" };
        // }
    }


    //表格展开,查询检测NG的不良项
    const expandChange=(row:any,expandedRows:any)=>{



        if (expandedRows.length==0)return;
        //判断当前是打开或者关闭操作
        let isOpen=false;
        for (let i = 0; i < expandedRows.length; i++) {
            if (expandedRows[i].MBID==row.MBID){
                isOpen=true;
                break;
            }
        }
        if (!isOpen) return;




        axios.post($hostIPApp190+"/materialBid/queryMaterialBidPast", {MBID:row.MBID}).then(async (response) => {

            let redata:any=response.data.arr


            row.items=redata;

        }).catch((response)=>{
            ElMessage.error( '请求出错，请刷新重试或联系管理员');
        })








    }



    //新增
    const addNew=()=>{


        entity.value={}
        p_tableData.value=[]
        activePane1.value='资料维护'


    }


    //增加新报价记录
    const addNewPast=(row:any)=>{

        entity.value={}

        entity.value.post=true
        entity.value.MBID=row.MBID
        entity.value.SupplierNo=row.SupplierNo
        entity.value.SupplierName=row.SupplierName
        entity.value.GoodsNo=row.GoodsNo
        entity.value.GoodsName=row.GoodsName

    }


    //提交前判断
    const submitCheck= async () => {


        let ifCanContinue = true;
        let alertCon = ''
        if ((entity.value.SupplierNo == null || entity.value.SupplierNo == '')) alertCon += '供应商/'
        if ((entity.value.GoodsNo == null || entity.value.GoodsNo == '')) alertCon += '品号/'
        if ((entity.value.BidPrice == null || entity.value.BidPrice == '')) alertCon += '价格/'
        if ((entity.value.ValidTimeStart == null || entity.value.ValidTimeStart == '')) alertCon += '有效期起/'
        if ((entity.value.ValidTimeEnd == null || entity.value.ValidTimeEnd == '')) alertCon += '有效期止/'

        if ((entity.value.RebateNum1+'') !='0' &&(entity.value.RebateNum1 == null || entity.value.RebateNum1 == '')) alertCon += '返利X吨1/'
        if ((entity.value.RebateMoney1+'') !='0' &&(entity.value.RebateMoney1 == null || entity.value.RebateMoney1 == '')) alertCon += '返利X元1/'
        if ((entity.value.RebateNum2+'') !='0' &&(entity.value.RebateNum2 == null || entity.value.RebateNum2 == '')) alertCon += '返利X吨2/'
        if ((entity.value.RebateMoney2+'') !='0' &&(entity.value.RebateMoney2 == null || (entity.value.RebateMoney2+'') == '' )) alertCon += '返利X元2/'


        if ((entity.value.HaveFare == null || entity.value.HaveFare == '')) alertCon += '是否含运费/'

        // if (entity.value.HaveFare=='否' &&(entity.value.FareValue == null || entity.value.FareValue == '')) alertCon += '莲桂支付运费/'
        if (entity.value.HaveFare=='否' && ((entity.value.ReturnFare+'') !='0' &&(entity.value.ReturnFare == null || (entity.value.ReturnFare+'') == '' ))) alertCon += '返运费/'







        if (alertCon != '') {
            ElMessage.warning(alertCon + '不可为空!')
            ifCanContinue = false
        }


        if (!ifCanContinue) {
            return "0";
        }

        //添加品号单位判断
        if (goodsShowList.value.length == 0) {
            await querygoodsBySpecific()
        }


        let ishave=false
        for (let i = 0; i < goodsShowList.value.length; i++) {

            if(goodsShowList.value[i].value==entity.value.GoodsNo){
                ishave=true
                if(goodsShowList.value[i].unit==null || goodsShowList.value[i].unit==''){
                    ElMessage.warning( '该品号的单位为空，不可被选择，请补充单位!');
                    return "0"
                }
                if(goodsShowList.value[i].unit=='kg' || goodsShowList.value[i].unit=='KG' || goodsShowList.value[i].unit=='吨'){
                    let i
                }else{
                    ElMessage.warning( '品号的单位必须要为：kg(不区分大小写)或吨!');
                    return "0"
                }
                entity.value.unit=goodsShowList.value[i].unit//把单位上传到后台
                break
            }


        }

        if(!ishave){
            ElMessage.warning( '该品号已停用，不可修改!');
            return "0"
        }

        if(entity.value.unit==null || entity.value.unit==''){
            ElMessage.warning( '该品号的单位为空，不可被选择，请补充单位!');
            return "0"
        }

        //判断该供应商是否已关闭
        // if (supShowList.value.length == 0) {
        //     await querySupBySpecific()
        // }

        //即时查询
        await querySupBySpecific()


        for (let i = 0; i < supShowList.value.length; i++) {

            if(supShowList.value[i].value==entity.value.SupplierNo){

                if(supShowList.value[i].closed==1){
                    ElMessage.warning( '该供应商已关闭，不可使用!');
                    return "0"
                }
            }

        }


    }

    const EditOK= async () => {


        let re:any=await submitCheck()



        if(re=="0"){
            return
        }



        ElMessageBox.confirm(
            '是否确认提交?',
            '提示',
            {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
                draggable: true,
            }
        ).then(async () => {

            selectOldOrderCanclDialogVisible.value=false
            inputNewOrderDialogVisible.value=false

            let actiontype = ''

            let api=''



            if(entity.value.post){
                if (entity.value.MPID == null) actiontype = 'add'
                else actiontype = 'edit'
                entity.value.MBID =currentRow.value.MBID
                api='updateMaterialBidPost'
            }else{
                if (entity.value.MBID == null) actiontype = 'add'
                else actiontype = 'edit'

                api='updateMaterialBid'
                entity.value.opid = user.value.opid

                delete entity.value.MPID
                delete entity.value.MBIndex
            }



            entity.value.action = actiontype

            // if(isCreateOrder.value){
            //     entity.value.isCreateOrder = 'Y'
            // }else{
            //     entity.value.isCreateOrder = 'N'
            // }




            if (actiontype == 'add') {
                entity.value.RecordState = '1'
                entity.value.Creator = user.value.username

            } else if (actiontype == 'edit') {
                //修改
                entity.value.Modifier = user.value.username
            }





            delete entity.value.PAGE_ROW_NUMBER
            delete entity.value.CreateDate
            delete entity.value.ModifyDate
            delete entity.value.unit
            delete entity.value.post



            axios.post($hostIPApp190 + "/materialBid/"+api, entity.value).then(async (response) => {

                if (response.data.result == '1') {
                    ElMessage.success('保存成功!')
                    entity.value.MBID = response.data.MBID
                    entity.value.MPID = response.data.MPID
                    if (actiontype == 'add') {
                        refresh()
                    } else if (actiontype == 'edit') {


                        if(api=="updateMaterialBid" || entity.value.MPID==p_tableData.value[0].MPID){
                            entity.value.CreateDate = currentRow.value.CreateDate
                            entity.value.ModifyDate = new Date()
                            Object.getOwnPropertyNames(entity.value).forEach(key => {
                                    currentRow.value[key] = entity.value[key]
                                }
                            )
                            entity.value.CheckDate=null
                            entity.value.Checkor=null
                            entity.value.CheckState=null
                        }


                    }

                    fl_updateBidFreightList()
                    p_getPostTableData()//查询过往报价记录

                } else {
                    ElMessage.warning(response.data.message)
                }


            }).catch((response) => {
                ElMessage.error('请求出错，请刷新重试或联系管理员');
            })


        })


    }


    const isCreateOrder:any=ref(false)//是否创建订单

    //检查是否已有旧订单(同供应商编号同品号)，如果没有的话，需要输入订单数量和送货日期，如果有的话，可以选择要中止哪些订单
    const checkIsHaveOrder=()=>{
        if(entity.value.MBID==null){
            ElMessage.warning('请选择一条记录!')
            return
        }

        if(entity.value.CheckState!=null){
            ElMessage.warning('该记录已审核!')
            return
        }

        return new Promise((resolve,reject)=>{

            let jo:any={
                goodsid:entity.value.goodsid,
                traderid:entity.value.traderid,
            }
            //查询是否有订单
            axios.post($hostIPApp190+"/materialBid/getOrderBySupAndGoods",jo).then((response) => {
                selectOldOrderCanclList.value=[]

                if(response.data.result=='0'){
                    //不存在,开启新订单录入信息界面

                    inputNewOrderDialogVisible.value=true
                    entity.value.OrderNum=0
                    entity.value.revdate=''
                    isCreateOrder.value=true

                }else{
                    //存在

                    selectOldOrderCanclList.value=response.data.arr

                    //全部默认不选中
                    for (let i = 0; i < selectOldOrderCanclList.value.length; i++) {
                        selectOldOrderCanclList.value[i].check=false
                    }

                    selectOldOrderCanclDialogVisible.value=true
                    isCreateOrder.value=false
                }

                resolve(true);
            }).catch((response)=>{
                ElMessage.error( '请求出错，请刷新重试或联系管理员');
                resolve(false);
            })

        })

    }

    //输入新订单必要信息
    const inputNewOrderDialogVisible:any=ref(false)
    //录入新订单信息提交
    const submitInputNewOrder=()=>{

        if(isCreateOrder.value){
            let alertCon = ''
            if ((entity.value.OrderNum == null || entity.value.OrderNum == '' || entity.value.OrderNum==0)) alertCon += '订单数量'

            if (alertCon != '') {
                ElMessage.warning(alertCon + '不可为空!')
                return
            }
        }

        auditMaterialBid()


    }

    //检测是否已过期
    const checkOverdue=(time:any)=>{

        if(new Date(time)<new Date()){
            return true
        }else{
            return false
        }
    }


    //选择旧订单中止
    const selectOldOrderCanclDialogVisible:any=ref(false)
    const selectOldOrderCanclList:any=ref([])//旧订单列表
    //提交选择旧订单中止
    const selectOldOrderCanclSubmit=()=>{
        auditMaterialBid()
    }


    //审核
    const auditMaterialBid=async ()=>{


        let re:any=await submitCheck()

        if(re=="0"){
            return
        }


        let alert2=''
        if(isCreateOrder.value){
            alert2='(提交后自动创建新订单)';
        }


        ElMessageBox.confirm(
            '是否确认提交?',
            '提示',
            {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
                draggable: true,
            }
        ).then(async () => {

            selectOldOrderCanclDialogVisible.value=false
            inputNewOrderDialogVisible.value=false


            if(isCreateOrder.value){
                entity.value.isCreateOrder = 'Y'
            }else{
                entity.value.isCreateOrder = 'N'
            }


            entity.value.Checkor = user.value.username




            axios.post($hostIPApp190 + "/materialBid/auditMaterialBid", entity.value).then(async (response) => {

                if (response.data.code == '1') {
                    ElMessage.success('审核成功!')
                    // entity.value.MBID = response.data.MBID
                    entity.value.CheckState='Y'
                    entity.value.CheckDate=new Date()
                    currentRow.value.CheckState='Y'
                    currentRow.value.CheckDate=new Date()
                    currentRow.value.Checkor=user.value.username

                    await selectOldOrderCancl()//中止选择的旧订单
                    p_getPostTableData()//查询过往报价记录



                } else {
                    ElMessage.warning(response.data.message)
                }


            }).catch((response) => {
                ElMessage.error('请求出错，请刷新重试或联系管理员');
            })


        })




    }


    //中止选择的旧订单
    const selectOldOrderCancl=()=>{
        if(selectOldOrderCanclList.value.length==0)return;

        let submitList:any=[]

        for (let i = 0; i < selectOldOrderCanclList.value.length; i++) {
            let item:any=selectOldOrderCanclList.value[i]
            if(item.check){
                let option:any={
                    itemno:item.itemno,
                    billid:item.billid,
                    billcode:item.billcode,
                    opid:user.value.opid,
                    MBID:entity.value.MBID
                }
                submitList.push(option)//把所有勾是的放进提交列表里
            }
        }

        if(submitList.length==0)return;

        return new Promise((resolve,reject)=>{
            //中止指定的订单
            axios.post($hostIPApp190+"/materialBid/canclSelectOldOrderCancl",submitList).then((response) => {
                resolve('End');
                let i
            }).catch((response)=>{
                ElMessage.error( '请求出错，请刷新重试或联系管理员');

            })


        })


    }

    const openFile=(fileFlag:any)=>{

        // if (currentRow.value.mjbh==null){
        //     ElMessage.warning("请选择一条记录!")
        //     return
        // }
        let fileNameID=currentRow.value.MBID
        let url=''
        if(fileFlag=='ypqrtzd'){
            url='http://192.168.0.3:8075/webroot/decision/view/report?viewlet=GZRS/ACC/ybqrtzd.cpt&affNO='+fileNameID
        }

        window.open(url);

    }

    //选择框更改输入类型
    const selectSearchConditionQa=(item:any)=>{

        for (let i = 0; i < labelNameList.length; i++) {
            if (labelNameList[i].prop==item.qA){
                if(labelNameList[i].datetype!=null || labelNameList[i].datetype) item.qT="datetype"
                else if(labelNameList[i].boole!=null || labelNameList[i].boole)  item.qT="boole"
                else item.qT=""
            }
        }

    }



    const p_tableData:any=ref([])

    //查询过往报价记录
    const p_getPostTableData=()=>{
        p_tableData.value=[]
        if (entity.value.MBID==null){
            return
        }

        axios.post($hostIPApp190+"/materialBid/queryMaterialBidPast", entity.value).then(async (response) => {

            let redata:any=response.data.arr

            p_tableData.value=redata

            if(p_tableData.value.length>0){
                entity.value.MPID=p_tableData.value[0].MPID
                fl_queryBidFreightList()//查询运费列表
            }


        }).catch((response)=>{
            ElMessage.error( '请求出错，请刷新重试或联系管理员');
        })

    }

    //展示过往记录 2025-07-29
    const p_showPostTableData=(item:any)=>{
        entity.value={}
        Object.getOwnPropertyNames(item).forEach(key =>{
                entity.value[key]=item[key]
            }
        )

        fl_queryBidFreightList()//查询运费列表
        //表示当前处于预览过往记录
        entity.value.post=true

    }


//*******************************************************运费列表
    //添加运费列表 2025-11-05
    const fl_bidFreightList:any=ref([])//运费列表

    //查询运费列表
    const fl_queryBidFreightList=()=>{
        fl_bidFreightList.value=[]
        let jo={
            MPID:entity.value.MPID
        }
        axios.post($hostIPApp190+"/materialBid/queryMaterialBidFreightByMPID",jo).then(async (response) => {
            let redata:any=response.data.data
            if(redata.length!=0){
                fl_bidFreightList.value=redata
            }
        }).catch((response)=>{
            ElMessage.error( '请求出错，请刷新重试或联系管理员');
        })
    }



    //新增
    const fl_addNewFreightList=()=>{
        let item:any={
            Creator:user.value.username,
            MPID:entity.value.MPID,
            TransportSupplierNo:'',
            TransportSupplier:'',
            Cost:''
        }
        fl_bidFreightList.value.push(item)

        fl_bidFreightList.value=[]
    }



    //移除
    const fl_removeFreightList=(index:any)=>{
        fl_bidFreightList.value.splice(index,1)
    }

    //更新运费列表
    const fl_updateBidFreightList=()=>{
        if(fl_bidFreightList.value==null || fl_bidFreightList.value.length==0)return

        let jo={
            arr:fl_bidFreightList.value
        }

        for (let i = 0; i < fl_bidFreightList.value.length; i++) {
            fl_bidFreightList.value[i].MPID=entity.value.MPID
        }



        axios.post($hostIPApp190+"/materialBid/updateMaterialBidFreight",jo).then(async (response) => {
           let i
        }).catch((response)=>{
            ElMessage.error( '请求出错，请刷新重试或联系管理员');
        })
    }



//*******************************************************

    //选择供应商
    const supOptions:any = ref([])
    const supShowList:any = ref([])

    //供应商选择查询
    const supRemoteMethod = async (query: string) => {
        // if (supShowList.value.length == 0) {
        //     await querySupBySpecific()
        // }

        await querySupBySpecific()

        if (query) {
            loading.value = true
            setTimeout(() => {
                loading.value = false
                supOptions.value = supShowList.value.filter((item: any) => {
                    return (item.label+item.value).includes(query)

                })
            }, 100)
        } else {
            supOptions.value = supShowList.value
        }
    }

    //查询供应商
    const querySupBySpecific=()=>{
        return new Promise((resolve,reject)=>{
            //查询供应商（特定条件）
            axios.post($hostIPApp190+"/custom/querySupBySpecific").then((response) => {
                let redata:any=response.data.arr
                supShowList.value = redata.map((item:any) => {
                    return { value: item.code.trim(), label: item.name.trim() ,code:item.traderid,closed:item.closed}
                })


                resolve('End');
            }).catch((response)=>{
                ElMessage.error( '请求出错，请刷新重试或联系管理员');
            })

        })

    }

    //选择供应商时显示供应商名
    const changeSupToGetSupName=()=>{
        entity.value.SupplierName=''
        for (let i = 0; i < supOptions.value.length; i++) {
            if(supOptions.value[i].value==entity.value.SupplierNo){
                entity.value.SupplierName=supOptions.value[i].label
                entity.value.traderid=supOptions.value[i].code
            }
        }
    }


    //*******************************************************车队选择供应商

    //选择供应商
    const fl_supOptions:any = ref([])
    const fl_supShowList:any = ref([])

    //供应商选择查询 带出供应商产品带运费的
    const fl_supRemoteMethod = async (query: string) => {
        if (fl_supShowList.value.length == 0) {
            await fl_querySupBySpecific()
        }



        if (query) {
            loading.value = true
            setTimeout(() => {
                loading.value = false
                fl_supOptions.value = fl_supShowList.value.filter((item: any) => {
                    return (item.label+item.value).includes(query)

                })
            }, 100)
        } else {
            fl_supOptions.value = fl_supShowList.value
        }


    }

    //查询供应商
    const fl_querySupBySpecific=()=>{
        return new Promise((resolve,reject)=>{
            //查询供应商（特定条件）
            axios.post($hostIPApp190+"/custom/querySupBySpecific_TransportSupplier").then((response) => {
                let redata:any=response.data.data

                fl_supShowList.value = redata.map((item:any) => {
                    return { value: item.code.trim(), label: item.name.trim() ,code:item.traderid}
                })


                resolve('End');
            }).catch((response)=>{
                ElMessage.error( '请求出错，请刷新重试或联系管理员');
            })

        })

    }

    //选择供应商时显示供应商名
    const fl_changeSupToGetSupName=(item:any)=>{
        item.TransportSupplier=''
        for (let i = 0; i < fl_supOptions.value.length; i++) {
            if(fl_supOptions.value[i].value==item.TransportSupplierNo){
                item.TransportSupplier=fl_supOptions.value[i].label

            }
        }


        console.log(item)
    }



    //*******************************************************


    //选择产品
    const goodsOptions:any = ref([])
    const goodsShowList:any = ref([])

    //品号选择查询
    const goodsRemoteMethod = async (query: string) => {
        if (goodsShowList.value.length == 0) {
            await querygoodsBySpecific()
        }
        if (query) {
            loading.value = true
            setTimeout(() => {
                loading.value = false
                goodsOptions.value = goodsShowList.value.filter((item: any) => {
                    return (item.label+item.value).includes(query)
                })
            }, 100)
        } else {
            goodsOptions.value = goodsShowList.value
        }
    }

    //查询品号
    const querygoodsBySpecific=()=>{
        return new Promise((resolve,reject)=>{
            //查询供应商（特定条件）
            axios.post($hostIPApp190+"/custom/queryGoodsByCondition",{}).then((response) => {
                let redata:any=response.data.arr
                goodsShowList.value = redata.map((item:any) => {

                    //如果单位为风干的话，默认为KG 2025-08-13
                    if((item.r4+'').trim()=='风干')item.r4='KG'

                    return { value: item.r1.trim(), label: item.r2.trim(),code:item.r3,unit:item.r4 }
                })



                resolve('End');
            }).catch((response)=>{
                ElMessage.error( '请求出错，请刷新重试或联系管理员');
            })

        })

    }

    //选择品号时显示品名
    const changegoodsToGetgoodsName=()=>{
        entity.value.GoodsName=''
        entity.value.goodsid=''
        for (let i = 0; i < goodsOptions.value.length; i++) {
            if(goodsOptions.value[i].value==entity.value.GoodsNo){

                if(goodsOptions.value[i].unit==null || goodsOptions.value[i].unit==''){
                    ElMessage.warning( '该品号的单位为空，不可被选择，请补充单位!');
                    entity.value.GoodsNo=''
                    return
                }

                if(goodsOptions.value[i].unit=='kg' || goodsOptions.value[i].unit=='KG' || goodsOptions.value[i].unit=='吨'){
                    entity.value.GoodsName=goodsOptions.value[i].label
                    entity.value.goodsid=goodsOptions.value[i].code
                }else{
                    ElMessage.warning( '品号的单位必须要为：kg(不区分大小写)或吨!');
                    entity.value.GoodsNo=''
                    return
                }


            }
        }
    }


    ///////////////////////////////////////////////////////////////////////////////////////////////////导出execl
    const ExportToExcelList:any=ref([])//要导出的数据
    const exportDropCol:any=ref([])//要导出数据的表头
    //获得要导出的数据
    const getExportToExcelData=()=>{




        //拼接查询条件
        searchCondition.value.condition=''

        //拼接查询条件
        //资料清单拼接
        let q1="and ( 1=1"
        for (let i = 0; i < 3; i++) {

            let item=searchCondition.value.qList[i]
            if (item.qA!=null && item.qA!='' && item.qB!=null && item.qB!='' && item.qC!=null && item.qC!=''  && item.qD!=''){
                let sql=''
                if (item.qB=='like') sql=item.qA+" like '%"+item.qC+"%'"
                else if (item.qB=='not like') sql=item.qA+" not like '%"+item.qC+"%'"
                else if(item.qB=='=') sql=item.qA+" = '"+item.qC+"'"
                else if(item.qB=='>=') sql=item.qA+" >= '"+item.qC+"'"
                else if(item.qB=='<=') sql="'"+item.qC+"' >= "+item.qA

                q1+=' '+item.qD+' '+sql
            }

        }
        q1+=' )'

        searchCondition.value.condition=q1

        searchCondition.value.condition+=searchCondition.value.order


        let pageReqEntity = {
            object: searchCondition.value,
            page: 1,
            size: 1000000,

        };
        axios.post($hostIPApp190+"/materialBid/queryMaterialBid", pageReqEntity).then((response) => {


            ExportToExcelList.value = response.data.list;



            for (let i = 0; i < ExportToExcelList.value.length; i++) {
                let item = ExportToExcelList.value[i]
                item.CreateDate=timeToStrTime(item.CreateDate,'2')
                item.ModifyDate=timeToStrTime(item.ModifyDate,'2')
            }

            //设置导出表头
            exportDropCol.value=[]



            for (let i = 0; i < labelNameList.length; i++) {
                exportDropCol.value.push(labelNameList[i])
            }



            setTimeout(() => {

                ExportToExcel('st');

            },500);



        }).catch((response)=>{
            ElMessage.error( '请求出错，请刷新重试或联系管理员');
        })



    }
    //开始导出
    const  ExportToExcel=(action:any)=>{

        let idName=''
        let fileName=''
        if(action=='st'){
            idName='tbl_exporttable_to_xls'
            fileName='材料报价'
        }

        const xlsxParam = { raw: true } // 导出的内容只做解析，不进行格式转换 如果不设置该属性80%可能导出的是0.8 可自行测试

        let wb = XLSXS.utils.book_new()

        let sheet = XLSXS.utils.table_to_sheet(document.getElementById(idName), xlsxParam)

        let arr_w=[]
        for (let i = 0; i < exportDropCol.value.length; i++) {
            let w={wpx:exportDropCol.value[i].width}
            arr_w.push(w)
        }

        sheet["!cols"] =arr_w

        XLSXS.utils.book_append_sheet(wb, sheet, "sheet1")

        // 循环找到对应的单元格修改样式
        for (const key in wb.Sheets) {
            for (const k in wb.Sheets[key]) {
                // 非!开头的属性都是单元格
                if (!k.startsWith('!')) {
                    const td = wb.Sheets[key][k]
                    //td每一个是单元格对象 v：单元格内容 t：单元格内容类型如string s：单元格样式
                    td.s = {
                        alignment: {
                            horizontal: "center",//设置水平居中
                            vertical:  "center",
                            // wrapText: true,//自动换行

                        }

                    }
                }
            }
        }




        const wbout = XLSXS.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' })
        try {
            filesaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), fileName+'.xlsx')
        } catch (e) {
            if (typeof console !== 'undefined') {
                console.log(e, wbout)
            }
        }
        return wbout

    }


    ///////////////////////////////////////////////////////////////////////即时查询 2025-06-04 17:04

    const selectDialogVisible_fast:any=ref(false)

    const currentSelectEntity_fast:any=ref({})//选择框选择后要回写的对象
    const currentShowTableData_fast:any=ref([])//选择框展示的数据
    const currentShowTableHeadCol_fast:any=ref([])//选择框展示表头
    const searchConditionSelect_fast:any=ref('')//选择框 查询条件

    const currentSelectFlag_fast:any=ref('')//查询的标识，提过该标识来区别
    //打开选择框
    const openSelectDialog_fast=(record:any,flag:any)=>{
        currentSelectFlag_fast.value=flag
        currentSelectEntity_fast.value=record
        selectDialogVisible_fast.value=true


        //供应商
        if(flag=='SupplierNo' ){
            currentShowTableHeadCol_fast.value=[
                {label:'供应商号',prop:"r1"},{label:'供应商名称',prop:"r2"}
            ]
        }else if(flag=='GoodsNo'){
            currentShowTableHeadCol_fast.value=[
                {label:'品号',prop:"r1"},{label:'品名',prop:"r2"}
            ]
        }

        currentShowTableData_fast.value=[]
        searchConditionSelect_fast.value=''
        getSelectData_fast()
    }

    //查询可选择数据
    const getSelectData_fast=()=>{
        // if(searchConditionSelect_fast.value==null || searchConditionSelect_fast.value==''){
        //     ElMessage.warning( '请输入查询条件!');
        //     return
        // }



        //供应商
        if(currentSelectFlag_fast.value=='SupplierNo'){
            let cdb={condition:searchConditionSelect_fast.value}
            axios.post($hostIPApp190+"/custom/querySupByCondition",cdb).then((response) => {
                let data:any=response.data.arr

                let arr:any=[]
                for (let i = 0; i < data.length; i++) {
                    let item={
                        r1:(data[i].r1+'').trim(),//号
                        r2:(data[i].r2+'').trim(),//名称
                    }
                    arr.push(item)
                }

                currentShowTableData_fast.value=arr

            }).catch((response)=>{
                ElMessage.error( '请求出错，请刷新重试或联系管理员');
            })
        }

        //品号只查询纸浆）
        if(currentSelectFlag_fast.value=='GoodsNo'){
            let cdb={condition:searchConditionSelect_fast.value}
            axios.post($hostIPApp190+"/custom/queryGoodsByCondition",cdb).then((response) => {
                let data:any=response.data.arr

                let arr:any=[]
                for (let i = 0; i < data.length; i++) {
                    let item={
                        r1:(data[i].r1+'').trim(),//号
                        r2:(data[i].r2+'').trim(),//名称
                        r3:(data[i].r3+'').trim(),//id
                        r4:(data[i].r4+'').trim(),//单位
                    }
                    arr.push(item)
                }

                currentShowTableData_fast.value=arr



            }).catch((response)=>{
                ElMessage.error( '请求出错，请刷新重试或联系管理员');
            })
        }


    }

    //选择框选中方法
    const handleCurrentSelectChange_select_fast=(row: any, column: any, event: Event)=>{


        if(currentSelectFlag_fast.value=='GoodsNo'){
            if(row.r4==null || row.r4==''){
                ElMessage.warning( '该品号的单位为空，不可被选择，请补充单位!');
            }
        }

        currentSelectEntity_fast.value[currentSelectFlag_fast.value]=row.r1


        if(currentSelectFlag_fast.value=='SupplierNo'){
            currentSelectEntity_fast.value['SupplierName']=row.r2
        }
        else if(currentSelectFlag_fast.value=='GoodsNo'){
            currentSelectEntity_fast.value['GoodsName']=row.r2
        }
        selectDialogVisible_fast.value=false

    }


    ///////////////////////////////////////////////////////////////////////////////////////////////////

    //查询函数
    const handleQuery = (params:any) => {

        loading.value = true;

        //拼接查询条件
        searchCondition.value.condition=''

        //拼接查询条件
        //资料清单拼接
        let q1="and ( 1=1"
        for (let i = 0; i < 3; i++) {

            let item=searchCondition.value.qList[i]
            if (item.qA!=null && item.qA!='' && item.qB!=null && item.qB!='' && item.qC!=null && item.qC!=''  && item.qD!=''){
                let sql=''
                let qai=item.qA
                let qci=item.qC

                if (item.qB=='like') sql=qai+" like '%"+qci+"%'"
                else if (item.qB=='not like') sql=qai+" not like '%"+qci+"%'"
                else if(item.qB=='=') sql=qai+" = '"+qci+"'"
                else if(item.qB=='>=') sql=qai+" >= '"+qci+"'"
                else if(item.qB=='<=') sql="'"+qci+"' >= "+qai

                q1+=' '+item.qD+' '+sql
            }

        }
        q1+=' )'

        searchCondition.value.condition=q1


        searchCondition.value.condition+=searchCondition.value.order

        //查询
        PageReq.value = {
            object: searchCondition.value,
            page: params.page,
            size: params.size,
        };
        axios.post($hostIPApp190+"/materialBid/queryMaterialBid", PageReq.value).then((response) => {
            // activePane1.value='资料清单'
            loading.value = false;
            tableList.value = response.data.list;



            //重置分页按钮
            pagination.value.current = params.page;
            pagination.value.total = response.data.total;
            queryDialogVisible.value=false


            for (let i = 0; i < tableList.value.length; i++) {
                tableList.value[i].index=(i+1)+((params.page-1)*params.size)
            }

            // if(tableList.value.length>0){
            //     //默认选中第一行
            //     let object=proxy.value.ctx.$refs['ref_mainTable']
            //     object.setCurrentRow(tableList.value[0])
            //
            // }


        }).catch((response)=>{
            ElMessage.error( '请求出错，请刷新重试或联系管理员');
        })

    };

    //条件查询
    const search = () => {
        handleQuery({
            Object: searchCondition.value,
            page: 1,
            size: pagination.value.pageSize,

        });

    }

    //刷新
    const refresh = () => {
        // activePane1.value='资料清单'



        handleQuery({
            Object: searchCondition.value,
            page: pagination.value.current,
            size: pagination.value.pageSize,
        });
    }


    //点击改变页数
    const handleCurrentChange = (val: number) => {
        handleQuery({
            object: searchCondition.value,
            page: pagination.value.current,
            size: pagination.value.pageSize,

        });

    }

    //标准时间转字符串2023-07-25
    const timeToStrTime=(time:any,num:any)=>{
        let date1:any = new Date(time)

        if (time==undefined || time==null) return ''
        // 年
        let y = date1.getFullYear()
        // 月
        let M = date1.getMonth() + 1
        M = M < 10 ? ('0' + M) : M
        // 日
        let d = date1.getDate()
        d = d < 10 ? ('0' + d) : d
        let h = date1.getHours()
        h = h < 10 ? ('0' + h) : h
        let m = date1.getMinutes()
        m = m < 10 ? ('0' + m) : m
        let s = date1.getSeconds()
        s = s < 10 ? ('0' + s) : s

        if (num=='1')
            return y+'-'+M+'-'+d
        if (num=='2')
            return y+'-'+M+'-'+d+' '+h+':'+m+':'+s
        if (num=='3')
            return h+''+m+''+s
        if (num=='4')
            return (y+'').substring(2,4)
        if (num=='5')
            return y+M+d+h+m+s
    }

    //获得指定时间，今天和一周前
    const getDay=(day:any)=>{
        var today = new Date();
        var targetday_milliseconds=today.getTime() + 1000*60*60*24*day;
        today.setTime(targetday_milliseconds); //注意，这行是关键代码
        let tYear = today.getFullYear();
        let tMonth:any = today.getMonth()+1;
        let tDate:any = today.getDate();

        tMonth = tMonth<10 ?('0'+tMonth):tMonth
        tDate = tDate<10 ?('0'+tDate):tDate
        return tYear+"-"+tMonth+"-"+tDate;
    }

    //单选
    const handleCurrentSelectChange =(val:any)=> {
        currentRow.value = val
        entity.value={}

        if (currentRow.value==null){
            currentRow.value={}

        }else {
            Object.getOwnPropertyNames(currentRow.value).forEach(key =>{
                    entity.value[key]=currentRow.value[key]
                }
            )

        }



    }


    //排序改变
    const handleSortChange=({ column, prop, order }:any)=>{

        searchCondition.value.order=''
        let setOrder=''


        if (order!='null'){

            if (order=='ascending'){
                setOrder='ASC'
            }else if(order=='descending'){
                setOrder='DESC'
            }

            searchCondition.value.order=" order by "+prop+" "+setOrder+""

            search()


        }

    }



    //保证currentRow不为null
    watch(currentRow,value => {
        if(currentRow.value==null){
            currentRow.value={currentstate:''}

        }
    })
    watch(entity,value => {
        if(entity.value==null){
            entity.value={}
        }
    })
    //表格高度自适应
    const tableHeight = ref(document.body.clientHeight-260);
    window.onresize = function () {
        tableHeight.value = document.body.clientHeight-260
    }


    // const $hostIPApp190='http://192.168.0.191:8101'
    const $hostIPApp190='https://one.rainbowklgz.com:8076/App190'

    const user:any=ref({})


    user.value.username = computed(() => store.state.auth.user)
    user.value.opid = computed(() => store.state.auth.opid)

    //最开始默认执行
    onMounted(async () => {


        // user.value.username='测试人'//用户姓名
        // user.value.opid='0'//用户id

        proxy.value=getCurrentInstance()

        fl_supRemoteMethod('')

        handleQuery({
            object: searchCondition.value,
            page: pagination.value.current,
            size: pagination.value.pageSize,

        });


    });


</script>



<style scoped>

    /*.el-tabs--border-card > .el-tabs__content {*/
    /*    padding: 3px;*/
    /*}*/
    .el-table /deep/ .el-table__cell {
        padding: 4px 0;

    }
    .el-table /deep/ th .el-table__cell {
        padding: 0px 0;
    }

    /*解决无法复制问题*/
    .el-table__body /deep/ td {
        user-select: text;
    }

    .el-table /deep/ .el-table__header {
        padding: 0px 0px;

    }

    .el-tabs--border-card > /deep/ .el-tabs__content {
        padding: 3px;
    }

    /*输入框内容居中*/
    .inputCenter /deep/ .el-input__inner {
        text-align: center;
        border: none;
        /*font-size: 12px;*/
    }

    .selectBo /deep/ .el-input__wrapper {
        background-color: #feffbe;
    }
    .noinput /deep/ .el-input__wrapper {
        background-color: #a5faff;
    }

    /*描述列表*/
    /deep/ .el-descriptions__body  .el-descriptions__table .el-descriptions__cell {
        line-height: 13px;
        background-color: #e1eef5;

    }

    /deep/ .el-dialog__body {
        padding: 0px 0px !important;
        /*padding: calc(var(--el-dialog-padding-primary) + 0px) var(--el-dialog-padding-primary) !important;*/

    }

    /deep/ .el-radio__label {
        padding-left: 8px;
    }

    /deep/ .el-form-item {
        margin-bottom: 10px;
    }


    /* 仅显示输入框的下边框 */
    .inputUnberBorder {
        border: 1px solid #94979c !important; /* 边框颜色，可以根据需要修改 */
        border-top: none !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
        margin-left: -10px;
    }

    /* 当前只有下边框是透明的情况下，可能需要额外的样式来实现边框的效果 */
    .inputUnberBorder:hover {
        border-color: #c0c4cc !important; /* 鼠标悬浮时边框的颜色，可以根据需要修改 */
    }

    /* 如果需要在聚焦时显示下边框，可以添加以下样式 */
    .inputUnberBorder:focus {
        border-color: #409eff !important; /* 聚焦时边框的颜色，可以根据需要修改 */
        outline: none !important; /* 移除默认的蓝色外边框 */
    }



    /* 仅显示输入框的下边框 */
    .inputUnberBorder_haveB {
        border: 1px solid #94979c !important; /* 边框颜色，可以根据需要修改 */
        border-top: none !important;
        border-left: none !important;
        border-right: none !important;

        margin-left: -10px;
    }

    /* 当前只有下边框是透明的情况下，可能需要额外的样式来实现边框的效果 */
    .inputUnberBorder_haveB:hover {
        border-color: #c0c4cc !important; /* 鼠标悬浮时边框的颜色，可以根据需要修改 */
    }

    /* 如果需要在聚焦时显示下边框，可以添加以下样式 */
    .inputUnberBorder_haveB:focus {
        border-color: #409eff !important; /* 聚焦时边框的颜色，可以根据需要修改 */
        outline: none !important; /* 移除默认的蓝色外边框 */
    }


    /*.el-dialog__body {*/
    /*    padding: calc(var(--el-dialog-padding-primary) + px) var(--el-dialog-padding-primary);*/
    /*    color: var(--el-text-color-regular);*/
    /*    font-size: var(--el-dialog-content-font-size);*/
    /*}*/

    /*.inputnoBorder{*/

    /*    width: 100%;*/
    /*    box-shadow: none;*/
    /*    border: none;*/
    /*    text-align: center;*/
    /*    padding: 0px;*/
    /*    margin: 0px;*/
    /*    !*font-size: 12px;*!*/

    /*}*/
    /*.inputnoBorder:focus {*/
    /*    border: none;*/
    /*    box-shadow: none;*/

    /*}*/






    /*!*底部滑动条*!*/
    /*/deep/ .el-scrollbar {*/
    /*    --el-scrollbar-bg-color: rgb(16, 61, 122);*/
    /*    --el-scrollbar-hover-bg-color: rgb(16, 61, 122);*/
    /*}*/
    /deep/ .el-scrollbar__bar.is-horizontal {
        height: 8px;
    }
    /deep/ .el-scrollbar__thumb{
        width:50px;
    }

    /* 隐藏Element UI的滚动条 */
    /deep/ .el-table__body-wrapper::-webkit-scrollbar {
        display: none;
    }

    /* 使原生滚动条可见 */
    /deep/ .el-table__body-wrapper {
        /*overflow-y: hidden; !* 隐藏垂直滚动条 *!*/
        overflow-x: auto; /* 显示水平滚动条 */
    }

    /* 针对Firefox的处理 */
    /deep/ .el-table__body-wrapper * {
        scrollbar-width: thin; /* 设置滚动条宽度 */
        scrollbar-color: transparent; /* 设置滚动条颜色透明 */
    }


    .el-tabs {
        --el-tabs-header-height: 35px;
    }
    .el-button{
        padding: 8px 10px;
    }
    .el-card {
        --el-card-padding: 10px;
    }

    .el-table {
        --el-table-header-bg-color: #f3f3f3;
    }

    .el-radio{
        margin-right: 12px;
    }

    .titleCell{
        text-align: center;
        background-color: #f5f7fa;

    }

    .el-checkbox {
        --el-checkbox-disabled-checked-input-fill: #066f80;
    }

    .el-table /deep/ .cell {
        padding: 0 2px;
    }

    /deep/ .el-tabs__header {

        margin: 3px;
    }

    .confirmTable th,td{
        border:1px solid #e5e5e5;
        justify-content: center;

        text-indent: 10px;
        /*font-size: 12px;*/
    }
    tr{
        height: 25px;
    }

    .confirmTablelabel{
        text-align: center;
        background-color: #f5f7fa
    }

    .el-divider--horizontal {
        margin: 12px 0;

    }


    /*/deep/ .el-input__inner {*/
    /*    --el-input-inner-height: calc(var(--el-input-height, 20px) - 2px);*/
    /*}*/
    .baseInformationTable .el-input {
        --el-input-height: 25px;
        margin-left: -10px
    }
    .baseInformationTable .el-select {
        width: 100%;
        margin-left: -10px;
        --el-component-size: 25px;
    }
    .baseInformationTable tr{
        height: 25px;
    }

    .baseInformationTable td{
        /*border: 1px solid blue;*/
        border:none
    }

    /* 选中某行时的背景色*/
    /deep/ .el-table__body tr.current-row > td {
        color: #2500a4;
        background: rgb(122, 198, 255) !important;
    }

    /deep/ .el-table__body  td {
        height: 15px;
    }
    /deep/ .el-checkbox.el-checkbox--large {
        height: 15px;
    }



    /deep/ .highlight {
        /*border: 1px solid red !important;*/
        background-color: #0a84ff !important;
    }

</style>
